package com.hospital.hospitalsystem.modules.doctor.service;

import com.hospital.hospitalsystem.modules.doctor.dao.entity.PrescriptionEntity;
import com.hospital.hospitalsystem.modules.doctor.dao.mapper.PrescriptionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author qiancheng
 * @date 2023/4/27
 */
@Component
public class PrescriptionService {

    @Autowired
    private PrescriptionMapper prescriptionMapper;

    public List<PrescriptionEntity> selectByExample(Example example) {
        return prescriptionMapper.selectByExample(example);
    }

    public void updateByExampleSelective(PrescriptionEntity prescriptionEntity,Example example) {
        prescriptionMapper.updateByExampleSelective(prescriptionEntity,example);
    }

    public void insertSelective(PrescriptionEntity prescriptionEntity) {
        prescriptionMapper.insertSelective(prescriptionEntity);
    }

    public void deleteByExample(Example example) {
        prescriptionMapper.deleteByExample(example);
    }
}
